<template>
  <div class="">
    <div class="tenantInfo-header">信息管理</div>
    <div class="tenantInfo-box">
      <div class="tenantInfo-box-title">
        <img src=""
             alt="">
        <div class="title-corporate">
          <p>上海奥迪世博店</p>
          <div class="tags">私营企业</div>
          <div class="join-us"
               v-if="!addStatus"
               @click="addGroupModal = true">
            <img src=""
                 alt="">
            加入集团
          </div>
          <div v-if="addStatus"
               class="join-us join-us1"><img src=""
                 alt=""> 所属集团：永达集团</div>
          <div class="corporate-box">
            <a-row>
              <a-col :span="8">
                <p>企业简称：<span>奥迪世博店</span></p>
              </a-col>
              <a-col :span="8">
                <p>法定代表人：<span>张一一</span><i>详细信息
                    <!-- //法人详细信息 -->
                    <div class="legalPerson">
                      <p>法定代表人：<span>张一一</span></p>
                      <p>手机号：<span>+86 18289876748</span></p>
                      <p>身份证正反面：</p>
                      <div>
                        <div>
                          <img src="../../../assets/image/tenantCenter/pic2.png"
                               alt=""
                               width="152"
                               height="42">
                        </div>
                        <p>头像面</p>
                      </div>
                      <div>
                        <div><img src="../../../assets/image/tenantCenter/pic1.png"
                               alt=""
                               width="153"
                               height="85"></div>
                        <p>国徽面</p>
                      </div>
                    </div>
                  </i></p>

              </a-col>
              <a-col :span="8">
                <p>统一社会信用代码：<span>91110108551385082Q</span></p>
              </a-col>
            </a-row>
            <a-row>
              <a-col :span="8">
                <p>企业简称：<span>小米科技</span></p>
              </a-col>
              <a-col :span="8">
                <p>营业期限：<span>长期</span></p>
              </a-col>
              <a-col :span="8">
                <p>注册资本：<span>185000万元人民币</span></p>
              </a-col>
            </a-row>
            <a-row>
              <a-col :span="8">
                <p>注册国家：<span>中国</span></p>
              </a-col>
              <a-col :span="16">
                <p>注册地址：<span>上海市黄浦区瑞金南路299号</span>
                  <i class="address">查看更多
                    <div class="legalPerson1">
                      <div class="title">更多地址 <span></span></div>
                      <a-table :columns="columns"
                               :data-source="data"
                               bordered
                               :pagination="false">
                      </a-table>
                    </div>
                  </i>
                </p>
              </a-col>
            </a-row>
            <a-row>
              <a-col :span="8">
                <p>经营品牌：<span>奥迪</span></p>
              </a-col>
            </a-row>
            <div>
            </div>
          </div>
        </div>
      </div>
      <div class="tenantInfo-box-content">
        <div class="content-title">
          <p>营业执照</p>
        </div>
        <div class="content-businesslicense">
          <div>
            <div class="businesslicense-title">
              <img src=""
                   alt="">
              <div @click="preview">预览</div>
            </div>
            <div class="businesslicense-content">
              <p>附件类型： <span>营业执照</span></p>
              <p>文件到期日： <span>2012/12/12</span></p>
              <p>附件描述：</p>
              <p>Here is the description，Here is the description，Here is the description，Here is the description</p>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- //预览遮罩层 -->
    <div class="zzc"
         v-if="previewStatus">
      <img src=""
           alt="">
      <div @click="previewNo">
        <img src=""
             alt="">
      </div>
    </div>

    <!-- //邀请码弹窗 -->
    <a-modal v-model="addGroupModal"
             title="加入集团"
             width="440px"
             height="199px"
             ok-text="确定"
             cancel-text="取消"
             :dialog-style="{ top: '35vh' }"
             @ok="handleOk"
             @cancel="handleCancel">
      <p class="
             addGroupModal-p">集团邀请码：<a-input v-model="userName"
                 placeholder="请输入集团邀请码"
                 style="width:320px"></a-input>
      </p>
    </a-modal>
  </div>
</template>
<script>
const columns = [
  {
    title: '国家',
    dataIndex: 'city1',
  },
  {
    title: '省/市/区',
    className: 'column-money',
    dataIndex: 'city',
  },
  {
    title: '详细地址',
    dataIndex: 'address',
  },
  {
    title: '邮政编码',
    dataIndex: 'code',
  },
  {
    title: '地址备注',
    dataIndex: 'addressbz',
  },
];
const data = [
  {
    key: '1',
    city1: '中国',
    city: '上海市',
    address: '上海市黄浦区瑞金南路299号',
    code: '462000',
    addressbz: '这里是备注，这里是备注'
  },
];
export default {
  data () {
    return {
      addStatus: false,
      data,
      columns,
      //预览遮罩层
      previewStatus: false,
      //加入集团弹窗
      addGroupModal: false,
    }
  },
  methods: {
    preview () {
      this.previewStatus = true
    },
    previewNo () {
      this.previewStatus = false
    },
    //取消
    handleCancel () {
      this.addGroupModal = false
    },
    //确定加入
    handleOk () {
      this.addGroupModal = false
    },
  },
}
</script>
<style lang="less" scoped>
.tenantInfo-header {
  width: 100%;
  height: 54px;
  background: #fff;
  line-height: 54px;
  color: @newColorGreyFontM;
  font-size: 16px;
  padding-left: 24px;
}
.tenantInfo-box {
  margin: 16px;
  .tenantInfo-box-title {
    height: 242px;
    background: #fff;
    margin-bottom: 16px;
    padding: 24px;
    > img {
      float: left;
      width: 68px;
      height: 68px;
      background: pink;
    }
    .title-corporate {
      margin-left: 84px;
      position: relative;
      > p {
        margin-bottom: 8px;
        font-size: 18px;
        font-weight: 500;
      }
      .tags {
        width: 64px;
        height: 24px;
        background: rgba(24, 118, 255, 0.08);
        border-radius: 2px;
        font-size: 12px;
        font-family: PingFangSC, PingFangSC-Regular;
        font-weight: 400;
        color: #1876ff;
        text-align: center;
        line-height: 24px;
        margin-bottom: 16px;
      }
      .join-us {
        img {
          width: 14px;
          height: 14px;
          margin-right: 8px;
        }
        position: absolute;
        right: 0;
        top: 0;
        background: #1876ff;
        width: 102px;
        height: 32px;
        border-radius: 100px 0px 0px 100px;
        line-height: 32px;
        text-align: center;
        color: #fff;
        font-size: 12px;
        cursor: pointer;
      }
      .join-us1 {
        background: #fff;
        width: 180px;
        color: @newColorGreyFontM;
        font-size: 14px;
      }
      .corporate-box {
        height: 120px;
        background: #fafafa;
        padding: 16px;
        p {
          font-size: 12px;
          color: @newColorGreyFont;
          margin-bottom: 8px;
          span {
            color: @newColorGreyFontM;
            padding-right: 8px;
          }
          i {
            font-style: normal;
            cursor: pointer;
            color: #1876ff;
          }
          i:hover .legalPerson {
            opacity: 1;
            height: 254px;
            display: block;
          }
        }
      }
    }
  }
  .tenantInfo-box-content {
    height: 468px;
    background: #fff;
    .content-title {
      height: 53px;
      border-radius: 2px 2px 0px 0px;
      box-shadow: 0px -1px 0px 0px rgba(39, 36, 36, 0.06) inset;
      padding: 17px 0;
      p {
        height: 16px;
        line-height: 18px;
        font-size: 14px;
        font-weight: 500;
        padding-left: 24px;
        border-left: 4px solid #1876ff;
      }
    }
    .content-businesslicense {
      padding: 16px 0 16px 24px;
      > div {
        width: 200px;
        height: 284px;
        border-radius: 4px;
        box-shadow: 0px 0px 4px 0px rgba(39, 36, 36, 0.1);
        background: #fff;
        float: left;
        margin-right: 24px;
        .businesslicense-title {
          position: relative;
          width: 200px;
          height: 120px;
          img {
            width: 200px;
            height: 120px;
            background: pink;
          }
          > div {
            position: absolute;
            right: 8px;
            top: 8px;
            width: 48px;
            height: 24px;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 2px;
            line-height: 24px;
            color: #fff;
            text-align: center;
            font-size: 12px;
            cursor: pointer;
          }
        }
      }
    }
    .businesslicense-content {
      height: 164px;
      padding: 16px;
      p {
        color: @newColorGreyFont;
        font-size: 12px;
        margin-bottom: 8px;
        height: 16px;
        line-height: 16px;
        span {
          float: right;
          color: @newColorGreyFontM;
        }
      }
      p:nth-child(3) {
        margin-bottom: 4px;
      }
    }
  }
}
.address:hover .legalPerson1 {
  opacity: 1;
  display: block;
}
.legalPerson {
  width: 456px;
  height: 0;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0px 0px 6px 2px rgba(0, 0, 0, 0.08);
  position: absolute;
  z-index: 99;
  top: 23px;
  left: -305px;
  opacity: 0;
  display: none;
  padding: 16px;
  > p {
    margin-bottom: 8px;
    height: 16px;
    line-height: 16px;
    color: @newColorGreyFont;
    font-size: 12px;
    span {
      color: @newColorGreyFontM;
    }
  }
  > div {
    float: left;
    width: 200px;
    > div {
      width: 200px;
      height: 120px;
      background: #f8f9fa;
      border: 1px solid #f2f4f6;
      border-radius: 2px;
      margin-bottom: 17px;
      text-align: center;
      line-height: 120px;
      img {
      }
    }
    > p {
      margin-bottom: 0;
      text-align: center;
    }
  }
  > div:nth-child(4) {
    margin-right: 24px;
  }
}
.legalPerson1 {
  left: -488px;
  width: 756px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0px 0px 6px 2px rgba(0, 0, 0, 0.08);
  position: absolute;
  z-index: 99;
  top: 23px;
  opacity: 0;
  display: none;
  padding: 16px;
}
.legalPerson1 .title {
  padding-bottom: 16px;
  color: @newColorGreyFontM;
  font-size: 14px;
  border-bottom: 1px solid @newBorder;
  margin-bottom: 16px;
  span {
    float: right;
    width: 16px;
    height: 16px;
    background: pink;
  }
}
.legalPerson::after {
  position: absolute;
  left: 430px;
  top: -9px;
  content: "";
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 10px solid #fff;
  filter: drop-shadow(1px -3px 2px rgba(39, 36, 36, 0.06));
}
.legalPerson1::after {
  position: absolute;
  right: 20px;
  top: -9px;
  content: "";
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 10px solid #fff;
  filter: drop-shadow(1px -3px 2px rgba(39, 36, 36, 0.06));
}
.zzc {
  position: fixed;
  width: 100%;
  height: 100%;
  background: hsla(0, 0%, 0%, 0.3);
  top: 0;
  left: 0;
  z-index: 999;
  text-align: center;
  > img {
    width: 800px;
    height: 571px;
    background: pink;
    margin-top: 10%;
  }
  > div {
    position: absolute;
    left: 50%;
    top: 70%;
    transform: translateX(-50%);
    background: pink;
    width: 40px;
    height: 40px;
    cursor: pointer;
  }
}
.addGroupModal-p {
  font-size: 12px;
  margin-bottom: 0;
}
/deep/ .ant-modal-footer .ant-btn {
  width: 72px;
  height: 32px;
  font-size: 12px;
  border-radius: 2px;
}

/deep/ .ant-table-thead > tr > th {
  padding: 8px 12px;
  font-size: 12px;
}
/deep/ .ant-table-tbody > tr > td {
  padding: 8px 12px;
  font-size: 12px;
}
</style>